-
Notifications
You must be signed in to change notification settings - Fork 161
Add Unit Tests for MCP feature #3787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: rithin-pullela-aws <[email protected]>
Signed-off-by: rithin-pullela-aws <[email protected]>
Signed-off-by: rithin-pullela-aws <[email protected]>
common/src/test/java/org/opensearch/ml/common/connector/McpConnectorTest.java
Show resolved
Hide resolved
ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/AgentUtilsTest.java
Outdated
Show resolved
Hide resolved
are we planning to add any integration test too? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3787 +/- ##
============================================
+ Coverage 77.98% 78.83% +0.84%
- Complexity 7388 7450 +62
============================================
Files 658 658
Lines 33279 33279
Branches 3749 3749
============================================
+ Hits 25954 26236 +282
+ Misses 5719 5396 -323
- Partials 1606 1647 +41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@dhrubo-os, not in this PR. Building ITs for MCP use case is not straight forward, because we would want an MCP server running to test the capability. We can perhaps use the MCP Server in openSearch to write ITs and test, I will look into it. |
Signed-off-by: rithin-pullela-aws <[email protected]>
Hey @rithin-pullela-aws. What are some reviewing objectives? I ask since Im a little overwhelmed as to how I can effectively review your PR, it seems some internal knowledge is required. |
Hi Brian, sorry about the delayed response. I updated the PR description with more details |
Description
Adds Unit tests for MCP feature
this tests the files:
We use the getConnector function in agent utils. To test the
getMcpToolSpecs
, we need to mock the internals of the get connector function using stubGetConnector() function inAgentUtilsTest.java
. We extend theAgentUtilsTest
class with MLStaticMockBase to mock the static methods insidegetConenctor()
function of AgentUtilsRelated Issues
Resolves #3743
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.